package cn.itcast.factory;

import cn.itcast.domain.Car;
import org.springframework.beans.factory.FactoryBean;

public class MyFactoryBeanImpl implements FactoryBean<Car>{

    @Override
    public Car getObject() throws Exception {
        Car car = new Car();
        car.setCarName("baoma");
        car.setColor("jinse");
        car.setPrice(9876);

        return car;
    }

    @Override
    public Class<?> getObjectType() {
        return Car.class;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
